let YMDHMSMS = (timestr)=>{
    var date = new Date(timestr);
    var y = date.getFullYear();
    var m = date.getMonth()+1;
    var d = date.getDate();
    var h = date.getHours();
    var min = date.getMinutes();
    var s = date.getSeconds();
    var ms = date.getMilliseconds();
    return `${y}-${add_zero(m)}-${add_zero(d)} ${add_zero(h)}:${add_zero(min)}:${add_zero(s)}.${add_two_zero(ms)}`
}
let add_zero=(num)=>{
    return num>9?num:"0"+num
}
let add_two_zero = (num)=>{
    if (num>=100) {
        return num
    }else if (num>=10){
        return "0"+num
    }else{
        return "00"+num
    }
}
export{
    YMDHMSMS
}